var UserLogin = {};

UserLogin.test = function(){
	$.ajax({
		type:"POST",
		url:context+'/front/front-news!review.action?'+$('#reviewForm').serialize(), 
		data:{},
		success:function(text){
			if(text=='success'){
				alert(text);
			}else if(text=='nouser'){
				$.messager.defaults={ok:"现在登录",cancel:"取消"};
				$.messager.confirm('', '请登录后进行评论：', function(r){
					if (r){
						location.href = context+'/front/member!login.action';
					}
				});
			}else{
				alert(text);
			}
		}
	});
}
